package cn.bird.storm.validated.paramcheck.model.least;


import cn.bird.storm.validated.paramcheck.CheckTrait;
import cn.bird.storm.validated.paramcheck.ParameterCheckBuilder;

public interface LeastOneNotEmptyTrait extends CheckTrait {
    /**
     * 至少一个非空参数校验
     * Coll.notEmpty
     * Str.notEmpty
     */
    default ParameterCheckBuilder least(String group, String fieldName, Object object) {
        return richCheckModelMap("LEAST_NOT_EMPTY_CHECK",
                LeastOneNotEmptyCheckBean.builder()
                        .group(group)
                        .msg(fieldName)
                        .value(object)
                        .build(),
                LeastOneNotEmptyCheckModel::new
        );
    }

}
